The present invention relates to a data processor controlled by microprograms, and more particularly to a data processor which can execute machine instructions having suboperation codes without using a large capacity control memory and complex hardware.
In general, in a data processor controlled by microprograms, there are provided microprograms each of which corresponds to a machine instruction and each of which consists of one or more micro instructions. These microprograms are stored in a control memory, and when a machine instruction is to be executed, a microprogram corresponding to the machine instruction is read out from the control memory and executed, so that the control necessary for the execution of the machine instruction is provided.
In a conventional data processor controlled by the microprograms, the control memory address of the microprogram, necessary for executing a machine instruction which has no suboperation code, is obtained by using an operation code of the machine instruction as an address in the control memory. That is, by accessing the control memory at the address designated by the operation code of the machine instruction stored in an instruction register, the first micro instruction of the microprogram corresponding to the machine instruction is read out and stored in a micro instruction registor and executed.
However, in a recent data processor, machine instruction having suboperation codes, in addition to the above-mentioned operation codes, are used in order to expand the functions of the machine instructions. In such a data processor, if the operation code and the suboperation code are combined and used as an address for the control memory in a manner similar to the above-mentioned conventional data processor in order to execute such a machine instruction having the suboperation code, it is necessary to use a very large capacity control memory and thus the cost of hardware of the data processor is increased. Moreover, since the number of the machine instructions is usually much smaller than the binary number expressed by the total number of bits in the operation code and the suboperation code, only a part of the control memory is filled by the micro instructions, if a large capacity control memory is used, and thus the control memory is not effectively utilized.